"use strict";
// 14、正确定义axjx 8:51
function Ajax(url, callback, type = 'get') {
    const xhr = new XMLHttpRequest();
    xhr.open(type, url, true);
    xhr.send();
    xhr.onreadystatechange = () => {
        if (xhr.status === 200 && xhr.readyState === 4) {
            return callback(JSON.parse(xhr.response));
        }
    };
}
